package jianzhiOffer;
//剑指 Offer 18. 删除链表的节点
public class Num18_deleteNode {
    public ListNode deleteNode(ListNode head, int val) {
        if(head==null){
            return null;
        }
        head.next=deleteNode(head.next,val);
        if(head.val==val){
            return head.next;
        }
        return head;


    }


}
